from abc import ABCMeta, abstractmethod


class Compiler(metaclass=ABCMeta):
    @abstractmethod
    def collect_source(self):
        pass

    @abstractmethod
    def compile_todo_object(self):
        pass

    @abstractmethod
    def run(self):
        pass

    def compile_and_run(self):
        self.collect_source()
        self.compile_todo_object()
        self.run()


class IOSCompiler(Compiler):
    def collect_source(self):
        print ('collecting swift source code')

    def compile_todo_object(self):
        print ('compiling swift code to LLVM bitcode')

    def run(self):
        print ('program running on runtime environment')


ios = IOSCompiler()
ios.compile_and_run()


